package com.jiangds.open.check.checker;

import com.jiangds.open.check.Checker;

/**
 * {@link LongChecker}
 *
 * @author jiangliang
 * @since 2021/1/5 16:08
 */
public class LongChecker extends AbstractChecker<Long,Long> {

    public LongChecker(Long target) {
        super(target);
    }

    @Override
    public Checker<Long, Long> notEmpty() {
        return notNull();
    }

    @Override
    public Checker<Long, Long> range(Long min, Long max) {
        return processor(t->t >= min && t <= max);
    }

    @Override
    public Checker<Long, Long> greater(Long greaterThan) {
        return processor(t-> t >= greaterThan);
    }

    @Override
    public Checker<Long, Long> less(Long lessThan) {
        return processor(t -> t <= lessThan);
    }

    @Override
    public Checker<Long, Long> in(Long... args) {
        return inProcessor(Long::equals,args);
    }
}
